paintCompression
Type
property
Summary
Specifies the compression format used for storing an image.
Syntax
get the paintCompression of <image>
set the paintCompression to {png | jpeg | gif | rle}
Description
Use the paintCompression property to obtain the format of images, or to change the format used for new images.
When an image is changed with a paint tool, it is recompressed the next time you leave the card it's on. The format in which it is compressed is set by the global paintCompression property.
To change an image's compression format, first set the paintCompression to the desired value, then paint in the image. Then either go to another card and return, or close and re-open the stack.
If an image's alphaData property contains any value other than 255 (opaque), it is automatically recompressed in PNG format to preserve the alpha channel data.
By default, the global paintCompression property is set to "rle" in standalones and "png" in the development environment.The paintCompression of an image is one of the following: "png", "jpeg", "gif", "rle", or "pict". By default, the paintCompression property of a newly created image is set to "rle" if it was created with the create command or by using a paint tool. If the image was created with the import command, its paintCompression is set to the format of the imported picture file.For images, this property is read-only and cannot be set; you can set only the global paintCompression
Examples
set the paintCompression to "PNG"
if the paintCompression of image "Photo" is "pict" then warnUser
Related
command: create, import, global, choose
glossary: property, compress, PICT, OS X, Windows, import, Mac OS, Unix, alpha channel, command, paint tool
keyword: default, file, image, card
property: JPEGQuality
Compatibility and Support
Introduced
LiveCode 1.1
OS
mac
windows
linux
ios
android
Platforms
desktop
server
mobile